package com.seawaterbt.mds.service.impl;

import com.seawaterbt.mds.model.Student;
import com.seawaterbt.mds.repository.first.StudentRepository;
import com.seawaterbt.mds.service.StudentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentRepository repository;

    @Override
    public Integer save(Student student) {
        student = repository.save(student);
        return student.getId();
    }
}
